/*
 * @Author: yuanchenxi 836909158@qq.com
 * @Date: 2024-07-24 16:57:31
 * @LastEditors: 武兴创 superjava@vip.qq.com
 * @LastEditTime: 2024-08-28 17:39:15
 * @FilePath: \SGFEM\DataStructure\FEM\Property\include\PBARLData.h
 */
#pragma once
#include <cstring>
#include <string>
#include <vector>

#include "DataStructure/Common/DataStructureNamespace.h"
#include "DataStructure/Common/Id.h"
#include "DataStructure/Common/Real.h"
#include "DataStructure/Input/Property/PropertyBase.h"

#include "BeamSectionStandardTypes.h"

SG_DATASTRUCTURE_FEM_NAMESPACE_OPEN
/** @brief 标准梁截面
 *
 * 预定义的截面形状。通过 \ref BeamSectionTypes "梁截面（形状）标准类型"和对应的几何尺寸定义截面形状
 */
struct DECLSPEC PBARLData : public PropertyBase
{
    SG::DataStructure::Common::Id                m_mId      = 0;      ///< 材料属性Id
    char                                         m_group[8] = { 0 };  ///< 截面名称
    char                                         m_type[8]  = { 0 };  ///< 截面类型
    SG::DataStructure::Common::Id                m_domainId = 0;
    std::vector<SG::DataStructure::Common::Real> m_dimension;         ///< 几何尺寸(xlm中没有该词条，放置末尾)
    SG::DataStructure::Common::Real              m_nsm = 0.0;         ///< 非结构质量

    /// @brief 获取标准梁截面类型
    /// @return
    SG::DataStructure::FEM::BeamSectionStandardTypes GetBeamSectionStandardTypes ();

    /// @brief      设置标准梁截面类型
    /// @param type 类型枚举
    void SetBeamSectionStandardTypes (SG::DataStructure::FEM::BeamSectionStandardTypes type);

    /// @brief 获取名称
    /// @return
    std::string GetGroup ();

    /// @brief  设置名称
    /// @param str
    void SetGroup (const char* str);
};

/// @brief 判断单元数据是否相等
DECLSPEC bool operator== (const PBARLData& a, const PBARLData& b);

SG_DATASTRUCTURE_FEM_NAMESPACE_CLOSE